package com.huawei.statistics.security.token;

import org.apache.shiro.authc.UsernamePasswordToken;

/**
 * Created by XuZhanSi on 2016/11/23 0023.
 */
public class UserToken extends UsernamePasswordToken {
    private String validCode;
    private int userType;

    public String getValidCode() {
        return validCode;
    }

    public int getUserType() {
        return userType;
    }

    public void setUserType(int userType) {
        this.userType = userType;
    }

    public void setValidCode(String validCode) {
        this.validCode = validCode;
    }

    public UserToken(String username, String password, int userType, boolean rememberMe, String validCode, String host) {
        super.setUsername(username);
        if (password != null)
            super.setPassword(password.toCharArray());
        super.setRememberMe(rememberMe);
        this.validCode = validCode;
        this.userType = userType;
        super.setHost(host);
    }
}
